﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace StudentAttendanceChecking
{
    public partial class frmListStudent : Form
    {
        //test demo disable close button window
        private const int SC_CLOSE = 0xF060;
        private const int MF_GRAYED = 0x1;
        [DllImport("User32")]
        private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
        [DllImport("User32")]
        private static extern int EnableMenuItem(IntPtr hMenu, int wIDEnableItem, int wEnable);

        public frmListStudent()
        {
            InitializeComponent();
        }

        private void frmListStudent_Load(object sender, EventArgs e)
        {
            EnableMenuItem(GetSystemMenu(this.Handle, false), SC_CLOSE, MF_GRAYED);
            //demo use linkq set data branch
            //dcBranchDataContext db = new dcBranchDataContext();
            //dataGridView1.DataSource = db.view_Branch();
        }
    }
}
